// **********************************************************************
//
// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.3.0

package com.wasion.gydpe.ice.proxy.commpublishinf;

public class CommPublishMessage extends
		com.wasion.gydpe.ice.proxy.publishsubscriber.CustomMessage {
	public CommPublishMessage() {
		super();
	}

	public CommPublishMessage(String sender, String topic, String receiver,
			CommProxy.CBasicParameter frame) {
		super(sender, topic, receiver);
		this.frame = frame;
	}

	private static class __F implements Ice.ObjectFactory {
		public Ice.Object create(String type) {
			assert (type.equals(ice_staticId()));
			return new CommPublishMessage();
		}

		public void destroy() {
		}
	}

	private static Ice.ObjectFactory _factory = new __F();

	public static Ice.ObjectFactory ice_factory() {
		return _factory;
	}

	public static final String[] __ids = { "::Comm::CustomMessage",
			"::CommPublishInf::CommPublishMessage", "::Ice::Object" };

	public boolean ice_isA(String s) {
		return java.util.Arrays.binarySearch(__ids, s) >= 0;
	}

	public boolean ice_isA(String s, Ice.Current __current) {
		return java.util.Arrays.binarySearch(__ids, s) >= 0;
	}

	public String[] ice_ids() {
		return __ids;
	}

	public String[] ice_ids(Ice.Current __current) {
		return __ids;
	}

	public String ice_id() {
		return __ids[1];
	}

	public String ice_id(Ice.Current __current) {
		return __ids[1];
	}

	public static String ice_staticId() {
		return __ids[1];
	}

	public void __write(IceInternal.BasicStream __os) {
		__os.writeTypeId(ice_staticId());
		__os.startWriteSlice();
		__os.writeObject(frame);
		__os.endWriteSlice();
		super.__write(__os);
	}

	private class Patcher implements IceInternal.Patcher {
		public void patch(Ice.Object v) {
			try {
				frame = (CommProxy.CBasicParameter) v;
			} catch (ClassCastException ex) {
				IceInternal.Ex.throwUOE(type(), v.ice_id());
			}
		}

		public String type() {
			return "::commproxy::CBasicParameter";
		}
	}

	public void __read(IceInternal.BasicStream __is, boolean __rid) {
		if (__rid) {
			__is.readTypeId();
		}
		__is.startReadSlice();
		__is.readObject(new Patcher());
		__is.endReadSlice();
		super.__read(__is, true);
	}

	public void __write(Ice.OutputStream __outS) {
		Ice.MarshalException ex = new Ice.MarshalException();
		ex.reason = "type CommPublishInf::CommPublishMessage was not generated with stream support";
		throw ex;
	}

	public void __read(Ice.InputStream __inS, boolean __rid) {
		Ice.MarshalException ex = new Ice.MarshalException();
		ex.reason = "type CommPublishInf::CommPublishMessage was not generated with stream support";
		throw ex;
	}

	public CommProxy.CBasicParameter frame;
}
